@import '~antd/es/style/themes/default.less';

html,
body,
#root {
  height: 100%;
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul,
ol {
  list-style: none;
}

@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;
    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;
        > span {
          display: block;
        }
      }
    }
  }
}

// 兼容IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
  body .ant-design-pro > .ant-layout {
    min-height: 100vh;
  }
}

// 设置顶部栏
.ant-layout-header {
  height: 64px !important;
  background: transparent !important;
}

.ant-pro-top-nav-header,
.ant-pro-top-nav-header-main {
  height: 64px !important;
  background: #2f86d8;
  color: #fff;
}

.ant-pro-global-header {
  height: 64px !important;
  background: #2f86d8 !important;
}

.ant-pro-global-header-logo {
  line-height: 64px !important;
}

.ant-pro-global-header-logo a {
  height: 64px !important;
}

.ant-pro-global-header-collapsed-button {
  display: none !important;
}

.ant-pro-top-nav-header-logo,
.ant-pro-top-nav-header-menu .ant-menu.ant-menu-horizontal {
  height: 64px !important;
  line-height: 64px !important;
}

.ant-pro-top-nav-header .ant-menu-submenu.ant-menu-submenu-horizontal {
  height: inherit !important;
  line-height: inherit !important;
}

.ant-pro-basicLayout {
  min-width: 1248px;
  overflow-x: auto !important;
}

// 隐藏原本顶部菜单
.ant-pro-top-nav-header-menu {
  display: none;
}

// 自定义顶部菜单
.topMenu {
  position: fixed;
  top: 0;
  left: 400px;
  z-index: 99;
  border-right: 0;
  background: inherit;
  white-space: nowrap;
  li {
    display: inline-block;
    vertical-align: top;
  }

  .ant-menu-item {
    margin-top: 0;
    margin-bottom: 0 !important;
    height: 64px;
    line-height: 64px;
    font-size: 16px;
  }

  & > .ant-menu-item a {
    color: rgba(255, 255, 255, 0.7);
  }

  & > .ant-menu-item-selected a {
    color: rgba(255, 255, 255, 1);
    font-weight: 800;
  }

  & > .ant-menu-item-selected {
    color: inherit;
    border-bottom: 0;
  }

  & > .ant-menu-item:hover,
  & > .ant-menu-item-active {
    color: #fff;
    border-bottom: 0;
    background-color: transparent;
  }

  & > .ant-menu-item-selected {
    background-color: transparent !important;
  }
}

.ant-pro-basicLayout-content {
  margin: 0 !important;
}

.ant-pro-page-container {
  margin-top: 0 !important;
}

// 自定义左侧菜单
.sideMenu {
  float: left;
  width: 240px;
  height: calc(100vh - 64px);
  background: #fff;

  .fold {
    height: 40px;
    text-align: right;
    font-size: 20px;
    line-height: 40px;
    padding-right: 12px;
    color: #2f86d8;
    box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.06);

    .anticon {
      cursor: pointer;
    }
  }

  .ant-menu {
    background: transparent;
  }

  .ant-menu-item .anticon {
    font-size: 16px !important;
  }

  .ant-menu-inline-collapsed > .ant-menu-item .anticon {
    font-size: 20px !important;
  }
}

.ant-pro-sider-fixed {
  top: 64px !important;
}

.ant-layout {
  display: inline-block;
}

// 自定义内容区域
.main {
  display: inline-block;
  height: calc(100vh - 64px);
  overflow-y: auto;
  width: 100vw;
  position: fixed;
  top: 64px;
  left: 0;
  padding-right: 24px;
  padding-bottom: 24px;
}

.ant-menu-vertical .ant-menu-item {
  padding: 0 24px;
}

.ant-pro-top-nav-header.light .ant-pro-top-nav-header-logo h1 {
  position: relative;
  color: #fff !important;
  margin-left: 18px;
  padding-left: 18px;

  &:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    height: 28px;
    width: 1px;
    background-color: #fff;
  }
}

// 设置滚动条
::-webkit-scrollbar {
  width: 5px;
  height: 8px;
  border-radius: 2px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.4);
}

.ant-breadcrumb {
  padding: 12px 0 !important;
}

@font-face {
  font-family: 'iconfont';  /* project id 1965293 */
  src: url('//at.alicdn.com/t/font_1965293_uzy70iqfcd.eot');
  src: url('//at.alicdn.com/t/font_1965293_uzy70iqfcd.eot?#iefix') format('embedded-opentype'),
  url('//at.alicdn.com/t/font_1965293_uzy70iqfcd.woff2') format('woff2'),
  url('//at.alicdn.com/t/font_1965293_uzy70iqfcd.woff') format('woff'),
  url('//at.alicdn.com/t/font_1965293_uzy70iqfcd.ttf') format('truetype'),
  url('//at.alicdn.com/t/font_1965293_uzy70iqfcd.svg#iconfont') format('svg');
}

.iconfont {
  font-family: 'iconfont' !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -webkit-text-stroke-width: 0.2px;
  -moz-osx-font-smoothing: grayscale;
}
